<?php

namespace Xin\Plugin\ThinkPHP\Commands;

use think\console\Command;
use think\console\Input;
use think\console\Output;
use Xin\Thinkphp\Plugin\DatabaseEvent;

class UpdateEventCacheCommand extends Command
{

    /**
     * @inheritDoc
     */
    protected function configure()
    {
        $this->setName('event:refresh')
            ->setDescription('刷新事件缓存配置');
    }

    /**
     * @param \think\console\Input $input
     * @param \think\console\Output $output
     */
    protected function execute(Input $input, Output $output)
    {
        DatabaseEvent::refreshCache();

        $output->highlight("已更新缓存配置！");
    }

}
